﻿<html>
<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=yes">
    <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>用户添加</title>
    <link rel="stylesheet" type="text/css" href="${ctxStatic}/ajz/mobile/css/iconfont.css?Timestamp=${Timestamp}">
    <link rel="stylesheet" type="text/css" href="${ctxStatic}/ajz/mobile/css/mdialog.css?Timestamp=${Timestamp}">
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/mobile/css/sf.css?Timestamp=${Timestamp}"/>
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/mobile/css/index.css?Timestamp=${Timestamp}"/>
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/mobile/css/add_baseinfo.css?Timestamp=${Timestamp}"/>
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/mobile/css/checkbox.css?Timestamp=${Timestamp}"/>
    <script type="text/javascript" src="${ctxStatic}/ajz/mobile/js/jquery.min.js?Timestamp=${Timestamp}"></script>
    <style>
        .imgContainer {
            width: 80%;
            height: 50%;
            margin-left: 10%;
        }
        .imgContainer img {
            width: 100%;
            height: 100%;
            display: inline-block;
        }
        .radio_houseType{
            float: left;

            padding-left: 35px;

        }
    </style>
</head>
<body>
<form name="addQYInfo" id="addQYInfo" method="post" action="${ctx}/ajz/ajzCompanyInfo/addQYInfo">
    <div id="sacnboxs"></div>
    <div id="add_roadio_box">
        <div class="type_box type_box_is_checked_btn">
            <b>企业</b>
            <input type="radio" id="deadLine_aqsc" checked="checked" class="dead_type_tbn1" name="add_roadio_box_type" value=""></div>

        <div class="type_box type_box_not_checked_btn">
            <b>店面</b>
            <input type="radio" id="deadLine_mdxf" class="dead_type_tbn1" name="add_roadio_box_type" value=""></div>

        <div class="type_box type_box_not_checked_btn">
            <b>出租屋</b>
            <input type="radio" id="deadLine_czw" class="dead_type_tbn1" name="add_roadio_box_type" value=""></div>
    </div>
    <hr class="line_hr_add">
    <h3 class="qy_t"><span class="qy_ba">&nbsp;</span> 基 础 信 息</h3>

    <ul class="table_information">
        <!-- 企业 -->
        <div class="aqsc">
            <!--<div class="imgContainer imgContainer_B"><span class="fontfamily Tin-cha">0</span></div>-->
            <!--enterprisePicture为营业执照，signboard为户外招牌-->
            <!--<input class="aqsc" type="hidden" id="enterprisePictureUrl" name="enterprisePictureUrl">-->
            <!--<input class="aqsc" type="hidden" id="signboardUrl" name="signboardUrl">-->
            <div class="aqsc">

                <h5 id="imgh5_1">户外招牌
                </h5>
                <ul class="table_photo_min" id="updateimg">
                    <ol>
                        <div style="">
                            <div id="upBox">
                                <div id="inputBox" onclick="updateImg(this)" value="false">
                                    <input type="button" name="chooseImage2" title="请选择图片" id="chooseImage2" >上传
                                </div>
                                <div id="imgBox1">
                                </div>
                                <!--<span class="imgspan">注：请上传清晰图片</span>-->
                            </div>
                        </div>
                    </ol>
                </ul>
                <br><br>
                <!--<div class="hi_degbtnbar_iup bgcolor" style="text-align:center;">-->
                <!--<button type="button" onclick="getPicMsg();" class="table_btn xgbtn_1">识别</button>-->
                <!--</div>-->

                <hr class="line_hr_add aqsc">
                <h5 id="imgh5_1">营业执照识别
                </h5>
                <ul class="table_photo_min" id="updateimg">
                    <ol>
                        <div style="">
                            <div id="upBox">
                                <div id="inputBox" onclick="updateImg(this)" value="true">
                                    <input type="button" title="请选择图片" id="chooseImage1" >上传
                                </div>
                                <div id="imgBox">
                                </div>
                                <!--<span class="imgspan">注：请上传清晰图片</span>-->
                            </div>
                        </div>
                    </ol>
                </ul>

            </div>


            <hr class="line_hr_add aqsc">

            <li class="aqsc"><i>所属社区：</i>
                <b>
                    <select name="office.officeCode">
                        <% for(office in officeList){ %>
                        <option value="${office.officeCode}">${office.officeName}</option>
                        <% } %>
                    </select>
                </b>
            </li>

            <li class="aqsc"><i>单位名称：</i>
                <b><input type="text" class="table_text_box yczz_aqsc" id="enterpriseName" name="enterpriseName" placeholder="请输入单位名称" ></b>
                <div class="must"></div>
            </li>
            <li class="aqsc"><i>营业执照号：</i>
                <b><input type="text" class="table_text_box num_aqsc" id="enterpriseNum" onchange="checkEnterpriseNum()"
                          name="enterpriseNum" placeholder="请输入营业执照号码" onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'').toUpperCase()">
                </b>
                <div class="must"></div>
            </li>
            <li class="aqsc"><i>法    人：</i>
                <b><input type="text" class="table_text_box" id="legalPerson" name="legalPerson" placeholder="请输入法定代表人姓名"></b>
            </li>
            <li class="aqsc"><i>法人电话：</i>
                <b><input type="text" class="table_text_box" name="legalPersonTel" maxlength=11 placeholder="请输入法定代表人电话"
                          onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')"></b></li>
            <li class="aqsc"><i>联 系 人：</i>
                <b><input type="text" class="table_text_box username_aqsc" id="contactPerson" name="contactPerson" placeholder="请输入联系人姓名"></b>
                <div class="must"></div>
            </li>
            <li class="aqsc"><i>联系电话：</i>
                <b><input type="text" class="table_text_box cell_aqsc" name="contactPersonTel" maxlength=11 placeholder="请输入联系人电话"
                          onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')"></b>
                <div class="must"></div>
            </li>
            <li class="aqsc"><i>公司地址：</i><b>
                <input type="text" class="table_text_box attr_aqsc" id="addr" name="addr" placeholder="请输入单位所在地址"></b>
                <div class="must"></div>
            </li>
            <li class="aqsc"><i>经营范围：</i><b><input type="text" class="table_text_box" name="buinessContent"
                                                   placeholder="请输入经营范围"></b></li>
            <li class="aqsc"><i>企业类型：</i><b><input type="text" class="table_text_box" name="enterpriseType"
                                                   placeholder="请输入企业类型"></b></li>
            <li class="aqsc"><i>员工数量：</i><b><input type="text" class="table_text_box" name="empCount"
                                                   placeholder="请输入员工数量" onKeyUp="value=value.replace(/\D/g,'')"
                                                   onafterpaste="value=value.replace(/\D/g,'')"></b></li>
            <li class="aqsc"><i>企业面积：</i><b><input type="text" class="table_text_box" name="area" placeholder="请输入企业面积"></b>
            </li>
            <li class="aqsc"><i>年 产 值：</i><b><input type="text" class="table_text_box" name="yearValue" id="yearValue"
                                                  placeholder="请输入企业年产值(单位:万元)"></b></li>
            <script>
                $("input[name='yearValue']").blur(function () {
                    if ($(this).val() >= 2000) {
                        $("#QY_nub option").eq(1).prop("selected", true)
                    } else {
                        $("#QY_nub option").eq(0).prop("selected", true)
                    }
                })
            </script>

            <li class="aqsc">
                <i>企业规模：</i>
                <b>
                    <select id="QY_nub" name="scale">
                        <option value="规下">规下</option>
                        <option value="规上">规上</option>
                        <option value="其他">其他</option>
                    </select>
                </b>
            </li>
            <li class="aqsc"><i>风险等级：</i>
                <b>
                    <select name="dangerLev">
                        <option value="三等风险">三等风险</option>
                        <option value="二等风险">二等风险</option>
                        <option value="一等风险">一等风险</option>
                    </select>
                </b>
            </li>
            <hr class="line_hr_add aqsc">
        </div>

        <!-- 门店 -->
        <div class="mdxf">
            <div class="mdxf">
                <h5 id="imgh5_1">户外招牌
                </h5>
                <ul class="table_photo_min" id="updateimg">
                    <ol>
                        <div style="">
                            <div id="upBox">
                                <div id="inputBox2" onclick="updateImg(this)"  value="false">
                                    上传
                                </div>
                                <div id="imgBox2">
                                    <!-- <div class="imgContainer imgContainer_B"><img src="img/ct.png"><span class="fontfamily Tin-cha">0</span></div> -->
                                </div>
                            </div>
                        </div>
                    </ol>
                </ul>
            </div>
            <hr class="line_hr_add mdxf">
            <div class="mdxf">
                <h5 id="imgh5_1">营业执照识别
                </h5>
                <ul class="table_photo_min" id="updateimg">
                    <ol>
                        <div style="">
                            <div id="upBox">
                                <div id="inputBox1" onclick="updateImg(this)"  value="true">
                                    上传
                                </div>
                                <div id="imgBox3">
                                    <!--<div class="imgContainer imgContainer_B"><img
                                            src="${ctxStatic}/ajz/mobile/img/ct.png"><span
                                            class="fontfamily Tin-cha">0</span></div>-->
                                </div>
                            </div>
                        </div>
                    </ol>
                </ul>
            </div>
            <hr class="line_hr_add mdxf">


            <li class="aqsc"><i>所属社区：</i>
                <b>
                    <select name="office.officeCode">
                        <% for(office in officeList){ %>
                        <option value="${office.officeCode}">${office.officeName}</option>
                        <% } %>
                    </select>
                </b>
            </li>

            <li class="mdxf">
                <i>户外招牌：</i>
                <b>
                    <input type="text" id="signboard" name="signboard" class="table_text_box yczz_dm" placeholder="请输入户外招牌名"><input type="hidden" value="0">
                </b>
                <div class="must"></div>
            </li>
            <li class="mdxf">
                <i>营业执照名：</i>
                <b>
                    <input type="text" id="mdxfEnterpriseName" name="mdxfEnterpriseName" class="table_text_box yczz_dm" placeholder="请输入营业执照名"><input type="hidden" value="0">
                </b>
                <div class="must"></div>
            </li>
            <li class="mdxf">
                <i>营业执照号：</i>
                <b>
                    <input type="text" id="mdxfEnterpriseNum" name="mdxfEnterpriseNum" class="table_text_box yczz_dm" onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'').toUpperCase()" placeholder="请输入营业执照号码">
                    <input type="hidden" value="0" >
                </b>
                <div class="must"></div>
            </li>

            <li class="mdxf"><i>联系人：</i><b><input type="text" id="mdxfContactPerson" name="mdxfContactPerson" class="table_text_box username_dm" id="username"
                                                  placeholder="请输入负责人姓名"></b><div class="must"></div></li>
            <li class="mdxf"><i>联系人电话：</i><b><input type="text" name="mdxfContactPersonTel" class="table_text_box cell_dm" id="cell"
                                                   maxlength=11
                                                   placeholder="请输入联系人电话" onKeyUp="value=value.replace(/\D/g,'')"
                                                   onafterpaste="value=value.replace(/\D/g,'')"></b><div class="must"></div></li>
            <li class="mdxf"><i>地址：</i><b><input type="text" id="mdxfAddr" name="mdxfAddr" class="table_text_box attr_dm" id="name"
                                                 placeholder="请输入所在地址"></b><div class="must"></div></li>


            <li class="mdxf">
                <i>场所面积：</i>
                <b>
                    <input type="text" name="mdxfArea" class="table_text_box" placeholder="请输入店面经营面积"
                           onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')">
                    <input type="hidden" value="0">
                </b>
            </li>
            <!--<li class="mdxf">-->
                <!--<i>身份证：</i>-->
                <!--<b>-->
                    <!--<input type="text" name="" class="table_text_box" placeholder="请输入身份证"><input type="hidden"-->
                <!--</b>-->
            <li class="mdxf">
                <i>员工人数：</i>
                <b><input type="text" name="mdxfEmpCount" class="table_text_box " id="sprs_in" placeholder="请输员工人数"
                          onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')">
                    <input type="hidden" value="0"></b>
            </li>
            <hr class="line_hr_add mdxf">
        </div>


        <!-- 出租屋 -->
        <div class="czw">
            <li class="czw"><i>所属社区：</i>
                <b>
                    <select name="office.officeCode">
                        <% for(office in officeList){ %>
                        <option value="${office.officeCode}">${office.officeName}</option>
                        <% } %>
                    </select>
                </b>
            </li>


            <li class="czw">    <!--TODO-->
                <i>联系人：</i>
                <b>
                    <input type="text" name="czwContactPerson" class="table_text_box username_czw" placeholder="请输入联系人姓名">
                    <input type="hidden" value="0">
                </b>
                <div class="must"></div>
            </li>
            <li class="czw">
                <i>联系人电话：</i>
                <b>
                    <input type="text" name="czwContactPersonTel" class="table_text_box cell_czw" placeholder="请输入联系电话" maxlength="11"
                           onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')">
                    <input type="hidden" value="0">
                </b>
                <div class="must"></div>
            </li>
            <li class="czw">
                <i>负责人：</i>
                <b>
                    <input type="text" name="czwChargePerson" class="table_text_box" placeholder="请输入负责人姓名">
                    <input type="hidden" value="0">
                </b>
            </li>
            <li class="czw">
                <i>负责人电话：</i>
                <b>
                    <input type="text" name="czwChargePersonTel" class="table_text_box" placeholder="请输入负责人电话" maxlength="11"
                           onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')"><input
                        type="hidden"
                        value="0">
                </b>
            </li>
            <li class="czw">
                <i>地址：</i>
                <b>
                    <input type="text" name="czwAddr" class="table_text_box address_czw" placeholder="请输入所在地址"><input
                        type="hidden"
                        value="0">
                </b>
                <div class="must"></div>
            </li>
            <li class="czw">
                <i>建筑层数：</i>
                <b>
                    <input type="text" name="czwFloorCount" class="table_text_box" placeholder="请输入建筑层数"
                           onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')"><input
                        type="hidden"
                        value="0">
                </b>
            </li>
            <li class="czw">
                <i>建筑面积：</i>
                <b>
                    <input type="text" name="czwArea" class="table_text_box" id="" placeholder="请输入建筑面积(平方米)"
                           onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')"><input
                        type="hidden" value="0">
                </b>
            </li>
            <li class="czw">
                <i>房屋类别：</i>
                <label class="radio_houseType">
                    <input type="radio" name="houseType" value="1" checked/>群租房
                </label>
                <label class="radio_houseType">
                    <input type="radio" name="houseType" value="2"/>一改多
                </label>
                <label class="radio_houseType">
                    <input type="radio" name="houseType" value="3"/>单间
                </label>
            </li>

        </div>

    </ul>


    <h3 class="qy_t qy_t_box"><span class="qy_ba">&nbsp;</span>涉 及 类 型</h3>
    <div class="switch_Box_p">
        <li>
            <span class="switch_box_span">天然气</span>
            <div class="switch_box box_1">
                <input type="checkbox" class="switch_1" id="deadLine_trq">
            </div>
        </li>
        <li>
            <span class="switch_box_span">液化气</span>
            <div class="switch_box box_1">
                <input type="checkbox" class="switch_1" id="deadLine_yhq">
            </div>
        </li>
        <li>
            <span class="switch_box_span">食品安全</span>
            <div class="switch_box box_1">
                <input type="checkbox" class="switch_1" id="deadLine_spaq">
            </div>
        </li>


        <!--  <li>
         <span class="switch_box_span">天然气</span>
         <div class="switch_box box_4">
             <div class="input_wrapper">
                 <input type="checkbox"  id="deadLine_czw" class="switch_4" id="">
                 <svg class="is_checked" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 426.67 426.67">
               <path d="M153.504 366.84c-8.657 0-17.323-3.303-23.927-9.912L9.914 237.265c-13.218-13.218-13.218-34.645 0-47.863 13.218-13.218 34.645-13.218 47.863 0l95.727 95.727 215.39-215.387c13.218-13.214 34.65-13.218 47.86 0 13.22 13.218 13.22 34.65 0 47.863L177.435 356.928c-6.61 6.605-15.27 9.91-23.932 9.91z"/>
             </svg>
                 <svg class="is_unchecked" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212.982 212.982">
               <path d="M131.804 106.49l75.936-75.935c6.99-6.99 6.99-18.323 0-25.312-6.99-6.99-18.322-6.99-25.312 0L106.49 81.18 30.555 5.242c-6.99-6.99-18.322-6.99-25.312 0-6.99 6.99-6.99 18.323 0 25.312L81.18 106.49 5.24 182.427c-6.99 6.99-6.99 18.323 0 25.312 6.99 6.99 18.322 6.99 25.312 0L106.49 131.8l75.938 75.937c6.99 6.99 18.322 6.99 25.312 0 6.99-6.99 6.99-18.323 0-25.313l-75.936-75.936z" fill-rule="evenodd" clip-rule="evenodd"/>
             </svg>
               </div>
         </div>
         </li> -->
    </div>

    <ul class="table_information" style="margin:0px;padding: 0px;">
        <li class="trq"><i>天然气性质：</i>
            <input type="hidden" value="0">
            <b>
                <select class="trq_rqse" name="naturalGasNature">
                    <option value="1">营业用户</option>
                    <option value="2">民用户</option>
                </select>
            </b>
        </li>
        <li class="trq">
            <i>天然气合同：</i>
            <b><input style="width: 67%" type="text" name="naturalGasContract" class="table_text_box"
                      id="naturalGasContract"
                      placeholder="请输入天然气合同编号"><input type="hidden" value="0"></b></li>

        <li class="yhq"><i>液化气性质：</i>
            <input type="hidden" value="0">
            <b>
                <select class="rqse" name="liquefiedGasNature">
                    <option value="1">营业用户</option>
                    <option value="2">民用户</option>
                </select>
            </b>
        </li>
        <li class="yhq">
            <i>液化气合同：</i>
            <b><input style="width: 67%" type="text" name="liquefiedGasContract" class="table_text_box"
                      id="liquefiedGasContract"
                      placeholder="请输入液化气合同编号"><input type="hidden" value="0"></b></li>

        <li class="spaq">
            <i>健康证：</i>
            <b><input style="width: 67%" type="text" name="healthCertificate" class="table_text_box"
                      id="healthCertificate" placeholder="请输入健康证号码"><input
                    type="hidden" value="0"></b></li>
    </ul>
    <hr class="line_hr_add">

    <div class="hi_degbtnbar_iup btn_box_bgcolor">
        <a href="javascript:history.go(-1);" class="xgbtn_a_3" style="">返 回</a>
        <!--<input type="submit" name="" value="提 交" class="table_btn xgbtn_a_4" id="btn_paicha" readonly="readonly">-->
        <a href="javascript:void(0)" class="table_btn xgbtn_a_4" id="btn_paicha" onclick="sub()">提 交</a>
    </div>
</form>
<%
include("/layouts/mask.html"){}
%>
<script type="text/javascript" src='${ctxStatic}/ajz/mobile/js/add_baseinfo.js?Timestamp=${Timestamp}'></script>
<script type="text/javascript" src="${ctxStatic}/ajz/mobile/js/vue.min.js?Timestamp=${Timestamp}"></script>
<script type="text/javascript" src="${ctxStatic}/ajz/mobile/js/zepto.min.js?Timestamp=${Timestamp}"></script>
<script type="text/javascript" src="${ctxStatic}/ajz/mobile/js/mdialog.js?Timestamp=${Timestamp}"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js?Timestamp=${Timestamp}"></script>
<script src="${ctxStatic}/ajz/mobile/js/add_wxpic.js?Timestamp=${Timestamp}" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="${ctxStatic}/ajz/mobile/js/sf.js?Timestamp=${Timestamp}"></script>
<script type="text/javascript">
    wx.config({
        debug: false,
        appId: '${appId}',
        timestamp: '${timestamp}',
        nonceStr: '${nonceStr}',
        signature: '${signature}',
        jsApiList: [
            'chooseImage',
            'previewImage',
            'uploadImage',
            'downloadImage',
            'scanQRCode'
        ]
    });

    /*给图片上传绑定动态按钮*/
    function updateImg(tin){
        var btnId = $(tin).next().attr('id');//获取当前元素的下一个元素
        var inputVal = $(tin).attr('value');//获取当前点击元素的vlaue
        upload(btnId,inputVal);
    }

    $(".imgContainer img").on("click", function () {
        if ($(this).next("span").text() == '0') {
            $(this).parent().addClass("img_a_b");
            $(this).css({"position": "fixed", "top": "0", "left": "0px", "z-index": "102", "height": "100%"});
            $(this).next("span").text('1')
        }
        else if ($(this).next("span").text() == '1') {
            $(this).css({"display": "block", "position": "relative", "top": "0", "left": "0px", "z-index": "1"});
            $(this).parent().removeClass("img_a_b");
            $(this).next("span").text('0')
        }
    })

    var canSumbit = 0;

    //根据营业执照号码判断是否已存在商家
    function checkEnterpriseNum() {
        var enterpriseNum = $("#enterpriseNum").val();
        if (enterpriseNum != "" && enterpriseNum != null) {
            $.ajax({
                url: "${ctx}/ajz/ajzCompanyInfo/checkEnterpriseNum",
                type: "POST",
                data: "enterpriseNum=" + enterpriseNum,
                dataType: "json",
                success: function (ajzCompanyInfo) {
                    new TipBox({type: 'error', str: '已存在此商家!', hasBtn: true});
                    canSumbit = 1;
                }, error: function () {
                    canSumbit = 0;
                }
            });
        }
    }



    //验证并提交
    function sub() {
        /*验证营业执照号是否存在*/
        if (canSumbit == 1) {
            new TipBox({type: 'error', str: '该商家已存在，请检查是否输入正确!', hasBtn: true});
            return false;
        }
        /*验证必填项*/
        if ($("#deadLine_aqsc").is(":checked")) { /*如果添加的未企业类型*/
            $("#addQYInfo").attr("action",'${ctx}/ajz/ajzCompanyInfo/addQYInfo');
            if ($(".yczz_aqsc").val() == "") {
                $(".yczz_aqsc").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请输入单位名称', hasBtn: true});
                return false
            }
            else if($(".num_aqsc").val()==""){
                $(".num_aqsc ").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请输入营业执照号码', hasBtn: true});
                return false
            }
            else if ($(".username_aqsc ").val() == "") {
                $(".username_aqsc ").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写负责人姓名', hasBtn: true});
                return false
            }
            else if ($(".cell_aqsc").val() == "") {
                $(".cell_aqsc").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写联系电话', hasBtn: true});
                return false
            }
            else if ($(".attr_aqsc").val() == "") {
                $(".attr_aqsc").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写所在地址', hasBtn: true});
                return false
            } else {
                //开启遮罩并提交
                VerifyAndsubmit("addQYInfo");
            }
        } else if ($("#deadLine_mdxf").is(":checked")) {/*如果添加的为店面类型*/
            $("#addQYInfo").attr("action",'${ctx}/ajz/ajzStoreInfo/addInfo');
            if ($("#signboard").val() == "") {
                $("#signboard").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写户外招牌名称', hasBtn: true});
                return false
            }
            else if ($("#mdxfEnterpriseNum").val() == "") {
                $("#mdxfEnterpriseNum").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写营业执照号码', hasBtn: true});
                return false
            }

            else if ($(".username_dm ").val() == "") {
                $(".username_dm ").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写负责人姓名', hasBtn: true});
                return false
            }
            else if ($(".cell_dm").val() == "") {
                $(".cell_dm").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写联系电话', hasBtn: true});
                return false
            }
            else if ($(".attr_dm").val() == "") {
                $(".attr_dm").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写所在地址', hasBtn: true});
                return false
            } else {
                //开启遮罩并提交
                VerifyAndsubmit("addQYInfo");
            }
        } else if ($("#deadLine_czw").is(":checked")) {/*如果添加的为出租屋类型*/
            $("#addQYInfo").attr("action",'${ctx}/ajz/ajzHouseInfo/addHouse');//TODO
            if ($(".username_czw").val() == "") {
                $(".username_czw").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写联系人姓名', hasBtn: true});
                return false
            }
            else if ($(".cell_czw ").val() == "") {
                $(".cell_czw").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写联系人电话', hasBtn: true});
                return false
            }
            else if ($(".address_czw").val() == "") {
                $(".address_czw").css("border", "1px solid #f00")
                new TipBox({type: 'error', str: '请填写所在地址', hasBtn: true});
                return false
            } else {
                //开启遮罩并提交
                VerifyAndsubmit("addQYInfo");
            }
        }
    }

    // new TipBox({type:'success',str:'操作成功',hasBtn:true}); //成功
    // new TipBox({type:'error',str:'对不起,出错了!',hasBtn:true});  //错误
    // new TipBox({type:'tip',str:'这是提示信息',clickDomCancel:true,setTime:10000500,hasBtn:true});   //提示
    // new TipBox({type:'load',str:"努力加载中..",setTime:1500,callBack:function(){    //加载
    // new TipBox({type:'success',str:'操作成功',hasBtn:true});
    // }});

    /*//图片到后台解析，后去返回的营业执照信息
   function getPicMsg(serverId) {

       if (serverId == "" || serverId == null) {
           alert("请上传图片");
           return false;
       }
       $.ajax({
           url: "${ctx}/ajz/ajzBaseinfo/getBLiscenseMsg",
           type: "POST",
           data: "pic=" + serverId,
           dataType: "json",
           success: function (result) {
               var list = result.words_result;
               console.log(list);
               //营业执照信息插入输入框
               var enterpriseName = list["单位名称"].words;
               var legalPerson = list["法人"].words;
               var enterpriseNum = list["社会信用代码"].words;
               var addr = list["地址"].words;


               $('#enterpriseName').val(enterpriseName);
               $('#legalPerson').val(legalPerson);
               $('#contactPerson').val(legalPerson);
               $('#enterpriseNum').val(enterpriseNum);
               $('#addr').val(addr);
               //调用检查商家是否存在方法
               checkEnterpriseNum();
               // checkEnterpriseName();
           }
       });
   }*/
</script>
</body>
</html>



